Skip to content

update png decoder to support png file with garbage trailing bytes#56

Open
TuanNA-kt wants to merge 1 commit intofluttercandies:mainfrom
TuanNA-kt:fix]-png-type-detection
Open

update png decoder to support png file with garbage trailing bytes#56
TuanNA-kt wants to merge 1 commit intofluttercandies:mainfrom
TuanNA-kt:fix]-png-type-detection

Conversation

@TuanNA-kt
Copy link

I encountered an issue when trying to get the size of a PNG image that contains garbage trailing bytes. The image is located in the assets folder with the name issue28-1.png.
To resolve this, I added a non-standard PNG decoder so that the getSizeResult function can return the correct image size without throwing an unsupported type error. The existing decoder is overly strict, as it requires the file to end with exact IEND bytes, which causes valid PNG files with trailing data to be rejected.

@TuanNA-kt TuanNA-kt requested a review from CaiJingLong as a code owner January 6, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant